package cn.tedu.shopol.taojin.controller;


import cn.tedu.shopol.taojin.dto.FindOrderDTO;
import cn.tedu.shopol.taojin.service.IOrderTwoService;
import cn.tedu.shopol.taojin.util.R;
import cn.tedu.shopol.taojin.vo.FindOrderByIdVO;
import cn.tedu.shopol.taojin.vo.OrderTwoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tedu.cn
 * @since 2020-12-08
 */
@RestController
@RequestMapping("/taojin/orderTwo")
public class OrderTwoController {

    @Autowired
    IOrderTwoService orderTwoService;

    @GetMapping("/get/sales/order")
    public R<List<OrderTwoVO>> getSalesOrders(){
        return R.ok().setData(orderTwoService.findOrderTwo());
    }

    @GetMapping("/a")
    public R<List<FindOrderByIdVO>> a(FindOrderDTO findOrderDTO){
        return R.ok().setData(orderTwoService.findOrderTwoById(findOrderDTO));
    }
}
